home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / lorri4.zip / REGULAR.SCR < prev    next >
Text File  |  1995-09-24  |  2KB  |  95 lines

  1. !
  2. ! Default adventurer script..
  3. !
  4. ! (c) DC Software, 1989-1995
  5. !
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11.   if player.hp = 0 then
  12.     writeln( player.name, " is dead!" );
  13.     STOP;
  14.   endif;
  15.  
  16.   if npc.picture >= 0 then
  17.     viewpcx(npc);
  18.   endif;
  19.  
  20.   loadtext( npc.text ); ! Get the NPC's text block !
  21.   loadvfl( npc.voice ); ! Get the NPC's voice block !
  22. ! First, say hello.. !
  23.   if NPC.V0 > 0 then
  24.     writeln( "Hello ", player.name, ". What brings you back?" );
  25.   else
  26.     writeln( "Hello. I am ", npc.name, ". How may I help you?" );
  27.   endif;
  28.  
  29. ! Now, set some variables..
  30.   NPC.V0 = 1; ! From know on, remember we've been here
  31.  
  32. :CHAT
  33.   L3 = getstr("Name","Job","Join","Bye");
  34.   if L3 = -1 goto CSTOP; 
  35.  
  36. ! Handle JOIN differently..
  37.   if L3 = 2 then 
  38.     if npc.level > player.level + 4 then
  39.       writeln( "You are much to inexperienced. Ask me again later!" );
  40.       goto CHAT;
  41.     endif;
  42.     if npc.level < player.level - 6 then
  43.       writeln( "I am much to inexperienced to join you.." );
  44.       goto CHAT;
  45.     endif;
  46.     if group.size = 6 then
  47.       writeln( "Your party is full!" );
  48.       goto CHAT;
  49.     endif;
  50.     if NOT dotext( S0 ) then
  51.       writeln( "Let's get busy!" );
  52.     endif;
  53.     JOIN;
  54.     goto XSTOP;
  55.   endif;
  56.  
  57. ! First, see if the keyword typed is in the character's writeln block !
  58.   if dotext( S0 ) then
  59.     if L3 = 3 goto XSTOP;
  60.     goto CHAT;
  61.   endif;
  62.  
  63. ! It didn't, so try the predefined ones..
  64.   on L3 goto CNAME, CJOB, CHAT, CSTOP;
  65.  
  66. ! Nope, try a 'DEFAULT' line
  67.   if not dotext( "DEFAULT" ) then
  68.     writeln( "I don't know anything about that!" );
  69.   endif;
  70.   goto CHAT;
  71.  
  72. :CNAME
  73.   writeln( "My name is ", NPC.name, "." );
  74.   GOTO CHAT;
  75.  
  76. :CJOB
  77.   writeln( "I am a ", npc.type );
  78.   GOTO CHAT;
  79.  
  80. :CSTOP
  81.   writeln( "Nice talking to you.." );
  82.   goto XSTOP;
  83.  
  84. ! Feel free to expand on this list.. !
  85.  
  86. !-----------------------------------------------------------------!
  87. ! All STOPs now lead here so the screen can be restored if needed !
  88. !-----------------------------------------------------------------!
  89. :XSTOP
  90.   if npc.picture >= 0 then
  91.     paint(window); ! Assumes the picture fits in the window !
  92.   endif;
  93.   stats(-1); ! Restore Stats area !
  94.   STOP;
  95.